// 过滤当前用户能够访问的路由表
// routerList 所有路由表
// author 权限
export default function filterRouter (routerList, author) {
    const res = routerList.filter(item => {
        return item.meta.author.includes(author)
    })
    res.length && res.forEach(item => {
        if(item.children) {
            item.children = filterRouter(item.children, author)
        }
    })
    return res
}